package com.bestcem.xm.ticket.service;

import com.bestcem.xm.common.core.domain.web.ServiceResult;
import com.bestcem.xm.ticket.controller.param.ticket.config.CreateConfigParam;
import com.bestcem.xm.ticket.controller.param.ticket.config.UpdateConfigParam;
import com.bestcem.xm.ticket.controller.vo.ticket.config.TicketConfigFlowVO;
import com.bestcem.xm.ticket.controller.vo.ticket.config.TicketConfigInfoV3VO;
import com.bestcem.xm.ticket.controller.vo.ticket.config.TicketConfigInfoVO;
import com.bestcem.xm.ticket.service.dto.ticket.flow.InsertFlowDTO;

import java.util.List;

/**
 * @author liheng
 * @version v1.0
 * @date 2021/8/19 10:57
 */
public interface TicketFlowService {

    /**
     * 转换TicketConfigVO中的ticketFlow给前端展示
     *
     * @param ticketConfigInfoVO ticketConfigInfoVO
     * @return 转换后的VO
     * @author liheng
     * @date 2021/8/20 10:37
     */
    TicketConfigInfoVO parseTicketFollowConfigData(TicketConfigInfoVO ticketConfigInfoVO);

    /**
     * 转换TicketConfigVO中的ticketFlow给前端展示
     *
     * @param ticketConfigInfoVO ticketConfigInfoVO
     * @return 转换后的VO
     * @author liheng
     * @date 2021/8/20 10:37
     */
    TicketConfigInfoV3VO parseTicketFollowConfigDataV3(TicketConfigInfoV3VO ticketConfigInfoVO);


    /**
     * 转换TicketConfigVO中的followConfig给前端展示
     *
     * @param followConfigs followConfigs
     * @return followConfigs
     * @author liheng
     * @date 2021/8/20 10:37
     */
    List<TicketConfigFlowVO.FollowConfig> parseFollowConfigForTicketConfig(List<TicketConfigFlowVO.FollowConfig> followConfigs);

    /**
     * 创建ticketConfig时初始化工单跟进人信息
     *
     * @param ticketConfigId 工单配置id
     * @param param          参数
     * @return 工单流程id
     * @author liheng
     * @date 2021/8/20 10:37
     */
    ServiceResult<List<String>> createTicketFollow(String ticketConfigId, CreateConfigParam param);


    /**
     * 创建工单流程
     *
     * @param ticketFlow 创建工单流程参数
     * @return 工单流程id list
     * @author liheng
     * @date 2021/8/20 10:59
     */
    String createTicketFlow(InsertFlowDTO ticketFlow);

    /**
     * 更新 工单流程
     *
     * @param ticketConfigId
     * @param param
     * @author liheng
     * @date 2021/8/25 21:45
     */
    void updateTicketFlow(String ticketConfigId, UpdateConfigParam param);
}
